package com.smfx.yxt.common.enums;

public enum WorkApprovalType {

	PRINTING_PAPER("printingPaper", "打印纸审批"),
	COPY_PAPER("copyPaper", "复印油纸审批"),
	TEACHING_GOODS("teachingGoods", "教学用品审批"),
	OVERTIME_APPLY("overtimeApply", "加班申请审批"),
	SCHOOL_BUS("schoolBus", "校车审批"),
	TEACHER_LEAVE("teacherLeave", "教师请教");

	private final String code;
	
	private final String desc;
	
	private WorkApprovalType(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDesc(String code) {
		try {
			for(WorkApprovalType status : WorkApprovalType.values()) {
				if(status.getCode().equals(code)) {
					return status.getDesc();
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	
	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
}
